package com.gaofei.sysmanager.kafka;/*
package com.gaofei.sysmanager.kafka;

import com.gaofei.sysmanager.common.MsgUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.kafka.listener.MessageListener;
import org.springframework.kafka.support.Acknowledgment;
import org.springframework.stereotype.Component;

*/
/**
 * @author : gaofee
 * @date : 10:32 2021/10/28
 * @码云地址 : https://feege.gitee.io
 *//*

@Component
@Slf4j  //开启日志管理的注解
public class MsgListenner  {

    @Autowired
    MsgUtil msgUtil;

    @KafkaListener(topics = "1904")
    public void msg(ConsumerRecord<String, String> date, Acknowledgment ack) {
        String key = date.key();
        String value = date.value();
        System.out.println(key+":"+value);
        log.info("key:{},value:{}",key,value);
//士大夫撒旦

        msgUtil.sendTextEmail("2390172499@qq.com","俊杰最好看","俊杰好看极了!!!");

        //手动提交
        ack.acknowledge();
    }

}
*/
